FROM python:3.9-slim

# Set up Scrapy environment with scrapy-splash
RUN pip install scrapy scrapy-splash

# Set working directory to /app
WORKDIR /app

# Copy the requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install -r requirements.txt

# Copy the application code
COPY . .

# Expose the port
EXPOSE 80

# Command to run the container
CMD ["scrapy", "crawl"]

